<?php
	include("../lib/DataProvider.php");
?>
<table width="100%" cellspacing="0">
	<tr class="dong2">
		<td colspan="6"><input type="button" onclick="ThemCH()" value="Thêm Cấu hình" class="btnThem"/></td>
	</tr>
	<tr class="dong1">
		<td class="khung">Mã CH</td>
		<td class="khung">Tên CH</td>
		<td class="khung">Mã LSP</td>
		<td class="khung">Bị Xoá</td>
		<td class="khung">Sửa</td>
		<td>Xoá</td>
	</tr>

<?php
	$ds=DataProvider::ExecuteQuery("select * from cauhinh ");
	$mau=0;
	while($row = mysql_fetch_array($ds,MYSQL_ASSOC))
	{
		$MaCH=$row["MACH"];
		$TenCH=$row["TENCH"];
		$MaLSP=$row["MALSP"];
		$BiXoa=$row["BIXOA"];
		?>
		<tr class="<?php if($mau%2 ==0) echo "nhat"; else echo "dam";?>">
			<td class="khung" align="center"><?php echo $MaCH;?></td>
			<td class="khung"><?php echo $TenCH;?></td>
			<td class="khung" align="center"><?php echo $MaLSP;?></td>
			<td class="khung" align="center"><?php echo $BiXoa;?></td>
			<td class="khung" align="center"><a href="?act=9&sk=2&ID=<?php echo $MaCH;?>"><img src="img/edit.png" width="25"/></a></td>
			<td align="center"><a href="?act=9&sk=3&ID=<?php echo $MaCH;?>"><img src="img/del.png" width="25"/></a></td>
		</tr>
		<?php
		$mau++;
	}
?>
</table>